import httpUtil from '../utils/request'

export function mapperPage(ns,ds,mns,page,limit){
    const params = {
        ns: ns,
        ds: ds,
        mns: mns,
        page: page,
        limit: limit
    }
    return httpUtil({
        url: '/mapper/page',
        method: 'get',
        params: params
    })
}

export function mapperList(ns,ds){
    const params = {
        ns,
        ds
    }
    return httpUtil({
        url: '/mapper/list',
        method: 'get',
        params: params
    })
}

export function mapperDel(ns,ds,mnss){
    const data = {
        ns,
        ds,
        mnss
    }
    return httpUtil({
        url: '/mapper/del',
        method: 'post',
        data: data
    })
}

export function mapperAdd(data){
    return httpUtil({
        url: '/mapper/add',
        method: 'post',
        data: data
    })
}

export function mapperUpdate(ns,name,description){
    const data = {
        ns,
        name,
        description
      }
    return httpUtil({
        url: '/mapper/update',
        method: 'post',
        data: data
    })
}

